REMOTE PC OPERATION BY: Art McKendry LAST UPDATE: 12/29/87 INTRODUCTION: How many times have you been at work and realized that a file or program you need is safely locked away in your P.C. at home? How many times have you been at home and needed some information from your P.C. at work for that new project proposal you are working on? Most people consider it a major investment when they purchase a high performance PC. Allowing remote utilization will allow better return on this investment. This article should provide you with some ideas on setting up the computers that you want to use for remote access. Chances are good that you already have all the hardware and software that you need to do this. Additional software can be used to add security and file transfer functions. Hardware can also be added for energy savings. DISCLAIMER: You may use this information at your own risk and discretion. No warranty is expressed or implied and no liability is assumed for damages that may result from the use of or improper use of the suggestions contained herein. Please feel free to add to this document any suggestions or corrections for applications on other PC brands and operating systems provided that you indicate your identity. KEEP IT SIMPLE: You should start out simple and add more functions as you learn the particular problems and techniques to overcome them. Your first assignment is to learn as much as you can about the modem that is installed on the PC you would like to remote access. If it is Hayes compatible then it can be set up to auto answer the phone line simply by sending it this command: ATS0=n (n is the number of rings to count before going on line.) Most BBS systems use 1 or 2 rings for this parameter. The next step will be to tell DOS to get it's command lines from the COM port your modem is connected to instead of the keyboard. Both the Modem setup and the DOS console device can be changed very simply with a DOS Batch file. Follow these steps to setup a remote DOS session: 1) Install AT.COM & DTR.COM in your root or DOS directory. 2) Create a file named REMOTE.BAT with the following commands in it: // comments: 1: :loop // Goto label to allow EXIT and RE-ENTRY 2: CTTY CON // Give keyboard command to allow 3: ECHO OFF // Turn off echo to screen 4: DTR ON // Talk to modem 5: AT S0=1 // Modem answers on first ring 6: ECHO ON // Echo back on 6: CTTY COM1 // Re-direct I/O to Modem Port 7: COMMAND // Load 2nd DOS Shell Command Processor 8: GOTO loop // Start over if EXIT command is typed. 3) You can execute REMOTE.BAT as needed or you can set it up to execute when the PC powers up by adding an entry to your AUTOEXEC.BAT file to run it. Once this batch is executed you should be able to dial in from another PC or even a dumb terminal. The modem should answer and connect on the 1st ring. By Hitting the Enter key a few times you should get a DOS prompt. (>) LIMITATIONS: Some things to remember about remote operation of your PC is that programs that bypass the DOS I/O routines will not work. Wordstar For example uses direct Screen Memory writing in order to keep it's operation snappy fast. Unfortunately this means that the com port loses control as soon as WS is loaded. The same problem occurs when the keyboard is accessed directly by a program. I have had few problems using most of the standard DOS commands. DIR, EDLIN, and DEBUG all work fine since all I/O is done through BIOS. There are some very good programmers working on fixes for this problem. In particular John Friel the creator of Qmodem is working on some programs that will allow the full keyboard scan code set to be echoed through the com ports along with a full copy of screen memory. Then it will be possible to use Lotus, and Wordstar type programs over a remote link. Don't look for high speed however unless you happen to have a 9600 baud modem. That's a lot of information to be echoed over a serial line. Other options include the installation of some type of multi-user operating system like XENIX. I,m not familiar with programs that operate with these on a P.C. but there are probably a few full featured word processors and CAD packages out there. FILE TRANSFERS: The next thing you will probably want to try is some type of file transfer over your remote link. You can use the capture function on the PC calling in by simply telling the remote to TYPE the remote text file as you capture it to a file on your local PC. The most efficient way however would be to use one of the common protocols such as KERMIT, XMODEM, DSZ, or YMODEM. The latest release of Qmodem comes bundled with these protocols and a batch type transfer can be initiated. You will need the same protocol program executing on both PC's in order for this to take place. There are excellent documentation files that come with Qmodem that will provide good direction on how to specifically do this. Basically you will load (for example) Kermit on the remote and tell it what file to send to you. It opens the file and waits for handshaking to start. Now you load Kermit on the local PC and tell it to receive a file from the com port. Kermit will send a ready command and the remote Kermit will start sending the file. All of the above protocols incorporate and error detection and correction scheme that will prevent telephone line noise from corrupting the data that is being sent. ADDING SECURITY: Having DOS "hot" all the time is not the most secure way to have your PC connected to the world. Someone could dial into it and literally have the run of the ranch. Remember all DOS commands are functional including ERASE, DELETE, AND FORMAT!! The solution here is to either remove these taboo commands from the PC or install some type of password security system. Crosstalk has an answer mode that can be used with a password. Just set up a version of XTALK to load in answer mode when you anticipate that you will need to do a remote access. Most Communications Bulletin Board Software will allow a user with high enough security to "DROP TO DOS". What this means is that in addition to adding easier file transfer and a message facility you can still Drop to DOS and execute other programs. Just install the BBS per it's instructions and assign yourself a Drop to Dos Security level. Now you can use your PC remotely and friends and associates with PC's can leave private messages on your Bulletin Board. No more telephone tag! SAVING ENERGY: The next level of enhancement involves saving energy. It's hard to anticipate when the need will arise to access your PC from a remote location. Instead of leaving it powered up 24 hours a day while you are away a small amount of hardware can be added to allow your PC to be powered down until it is needed. The best way to do this is with an External modem that has a Carrier Detect signal on its Serial connector. This signal can be used to latch a power relay on whenever the modem answers the phone and a carrier tone is detected. When you need your PC simply call the Modem and wait for the PC to power up. When the connection is broken a timer can power down the PC after a preset time delay. Make sure that you set up the AUTOEXEC.BAT to re-direct and load your software when it is powered up. I use a floppy in drive A: with a BBS system on it. For normal use I simply remove the floppy. When I'm away I put the floppy back in. That way I have a Physical indication of what mode the PC will power up in. want to use for remote access. Chances are good that you already have all the hardware and software that you need to do this. Additional software can be used to add security and file transfer functions. Hardware can also be added for energy savings. If you have an internal modem then things get much more complicated because the PC has to be on for the Modem to detect a carrier. The solution here is to use an external "RING AND LOOP CURRENT" detection circuit. In my installation I have a black box that employs a standard RING detection IC connected between the phone Jack and the P.C. When the phone starts ringing the PC power is applied and a timer is started. After the PC boots up and answers the phone a loop current detector keeps the pc powered up as long as the phone is off hook. Again after a preset idle period the power is removed. There are several commercial boxes out there that can do the above. In my case I put together my own. If anyone is interested in a circuit schematic send me a stamped self addressed envelope and I will send you a copy of what I am using. Art McKendry 632 Ingleside Flint, Michigan 48507 Voice: (313) 743-0272 BBS : (313) 743-0502 (BBS dial cycle Twice to allow PC to wake up) Compuserve: 76470,112